package com.hxzy.service.impl;

import com.hxzy.dto.HoustStatusDTO;
import com.hxzy.entity.HouseStatus;
import com.hxzy.mapper.HouseStatusMapper;
import com.hxzy.service.HouseStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 类说明
 *
 * @author admin
 * @date 2021-09-08
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class HouseStatusServiceImpl extends CommonServiceImpl<HouseStatus,Integer> implements HouseStatusService {

    private HouseStatusMapper houseStatusMapper;

    @Autowired
    public void setHouseStatusMapper(HouseStatusMapper houseStatusMapper) {
        this.houseStatusMapper = houseStatusMapper;
        super.setMyBatisBaseDao(houseStatusMapper);
    }


    @Override
    public List<HouseStatus> search(HoustStatusDTO houstStatusDTO) {
        return this.houseStatusMapper.search(houstStatusDTO);
    }

    @Override
    public int existsName(Integer id, String name) {
        return this.houseStatusMapper.existsName(id,name);
    }
}
